Relational databases often receive queries in the form of Structured Query Language (SQL), or other structured format. One type of command that can be present in a SQL query is an outer join command. In an outer join command, two tables are combined without a requirement that the two tables have matching records. The resultant combined table contains all records of a first table and all records of the second table, with null in the places in the records of the second table that have no matching record in the first table. A left outer join identifies a left table as the first table and a right table as the second table, and thus the result of a left outer join contains all records of the left table even if the join condition finds no matching record in the right table. Such left outer join commands are utilized in a number of different queries, however in some cases they are inefficient to process.
An inner join is a common join operation. An inner join creates a new result table by combining column values from a first table and a second table based upon a join-predicate. A comparison is made of each row of the first table with each row of the second table to find all pairs of rows which satisfy the join-predicate. When the join-predicate is satisfied, column values for each matched pair of rows of the first table and the second table are combined into a result row.
An IN operation allows for the specification of multiple values, any one of which, if present, would satisfy the IN operation. In this manner, it is similar to providing multiple OR operations.